import 'package:flutter_test/flutter_test.dart';
import 'package:my_flutter_baidu_map/my_flutter_baidu_map.dart';
import 'package:my_flutter_baidu_map/my_flutter_baidu_map_platform_interface.dart';
import 'package:my_flutter_baidu_map/my_flutter_baidu_map_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMyFlutterBaiduMapPlatform
    with MockPlatformInterfaceMixin
    implements MyFlutterBaiduMapPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MyFlutterBaiduMapPlatform initialPlatform = MyFlutterBaiduMapPlatform.instance;

  test('$MethodChannelMyFlutterBaiduMap is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMyFlutterBaiduMap>());
  });

  test('getPlatformVersion', () async {
    MyFlutterBaiduMap myFlutterBaiduMapPlugin = MyFlutterBaiduMap();
    MockMyFlutterBaiduMapPlatform fakePlatform = MockMyFlutterBaiduMapPlatform();
    MyFlutterBaiduMapPlatform.instance = fakePlatform;

    expect(await myFlutterBaiduMapPlugin.getPlatformVersion(), '42');
  });
}
